<!DOCTYPE html>
<html>
<head>
    <title>备件需求计划明细</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="4">
                    <Date-picker type="month" format="yyyy-MM" v-model="q.organMonth" placeholder="需求月份"></Date-picker>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row :gutter="16" style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group" v-show="!isQuery">
                #if($shiro.hasPermission("toolsdemandplandetail:save"))
                <i-button type="info" @click="cancel"><i class="fa fa-eraser"></i>&nbsp;取消在途</i-button>
                #end
                #if($shiro.hasPermission("toolsdemandplandetail:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("toolsdemandplandetail:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("toolsdemandplandetail:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
	    <table id="jqGrid"></table>
    </div>
    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
		<i-form ref="formValidate" :model="toolslist" :rules="ruleValidate" :label-width="120">
            <Row>
                <i-col span="11">
                    <Form-item label="工装名称" prop="name">
                        <i-input v-model="toolslist.name" placeholder="工装名称" ref="materialNameInput" icon="md-arrow-dropdown-circle" @on-click="loadToolsList" icon="md-arrow-dropdown-circle"  ></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="图号" prop="mapNo">
                        <i-input v-model="toolslist.mapNo" search  placeholder="物料编码" readonly></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="规格型号" prop="type">
                        <i-input v-model="toolslist.type" placeholder="型号规格" readonly></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="现场装机总量" prop="capacity">
                        <i-input v-model="toolslist.capacity" placeholder="现场装机总量" readonly></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="库存数" prop="stockNum">
                        <i-input v-model="toolslist.stockNum" placeholder="现存数量" readonly></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="在途数" prop="transitNum">
                        <i-input v-model="toolslist.transitNum" placeholder="在途数" readonly></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="需求数量" prop="demandNum">
                        <input-number v-model="toolslist.demandNum" :min="1" style="width: 100%"></input-number>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="预计使用时间" prop="planeTime">
                        <Date-picker type="date" v-model="toolslist.planeTime" placeholder="预计使用时间"></Date-picker>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="计划单价" prop="planPrice">
                        <i-input v-model="toolslist.planPrice" placeholder="请输入数字,小数点后不超过两位" style="width: 200px"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px">返回</i-button>
                <i-button type="info" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
	</Card>
</div>
<script src="${rc.contextPath}/js/tools/toolsDemandPlanItem.js?_${date.systemTime}"></script>
</body>
</html>
